//
// Created by weimian on 2021/3/15.
//
_Pragma("once")

#include <pcl/filters/voxel_grid.h>

class VoxelGridFilter {
public:
    VoxelGridFilter();
    VoxelGridFilter(double lx, double ly, double lz);

    void setLeafSize(double lx, double ly, double lz);

    /**
     * @brief 执行体素滤波
     * @param cloud_in 输入点云
     * @param cloud_out 输出点云
     * @return 操作状态
     */
    void filter(const pcl::PointCloud<pcl::PointXYZRGB> &cloud_in,
                pcl::PointCloud<pcl::PointXYZRGB> &cloud_out);

protected:
    double leaf_size_x_;
    double leaf_size_y_;
    double leaf_size_z_;
};
